<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>API基本概念 | HMuSeaB の 小站</title><meta name="author" content="HMuSeaB"><meta name="copyright" content="HMuSeaB"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="1、API是什么API全称 Application Programming Interface，应用程序接口。 可以通过我之前的回答了解一下 如何通俗解释API。通常搜索在API的解释都是一组定义、程序及协议的集合，但对于不懂技术的人来说，这或许比较难以理解，接下来用抽象的故事来描述一下API。 假如老王开了一家银行，银行呢只有仓库和记账本，顾客来了之后将金钱放在仓库里并在记帐本上记帐。老王很快就">
<meta property="og:type" content="article">
<meta property="og:title" content="API基本概念">
<meta property="og:url" content="https://hmuseab.github.io/2023/04/15/API/index.html">
<meta property="og:site_name" content="HMuSeaB の 小站">
<meta property="og:description" content="1、API是什么API全称 Application Programming Interface，应用程序接口。 可以通过我之前的回答了解一下 如何通俗解释API。通常搜索在API的解释都是一组定义、程序及协议的集合，但对于不懂技术的人来说，这或许比较难以理解，接下来用抽象的故事来描述一下API。 假如老王开了一家银行，银行呢只有仓库和记账本，顾客来了之后将金钱放在仓库里并在记帐本上记帐。老王很快就">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg">
<meta property="article:published_time" content="2023-04-15T13:51:00.000Z">
<meta property="article:modified_time" content="2024-05-18T11:47:31.252Z">
<meta property="article:author" content="HMuSeaB">
<meta property="article:tag" content="知识">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://hmuseab.github.io/2023/04/15/API/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css?v=4.13.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: undefined,
  noticeOutdate: {"limitDay":500,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid@4.11.1/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'API基本概念',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2024-05-18 19:47:31'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><link rel="stylesheet" href="/css/style.css"><meta name="generator" content="Hexo 7.2.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i0.hippopx.com/photos/121/457/241/girls-the-scenery-wallpaper-7f97112750013868bc5bcc249f13e27d.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">6</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="HMuSeaB の 小站"><span class="site-name">HMuSeaB の 小站</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">API基本概念</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-04-15T13:51:00.000Z" title="发表于 2023-04-15 21:51:00">2023-04-15</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-05-18T11:47:31.252Z" title="更新于 2024-05-18 19:47:31">2024-05-18</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">1.2k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>3分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="API基本概念"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h2 id="1、API是什么"><a href="#1、API是什么" class="headerlink" title="1、API是什么"></a>1、API是什么</h2><p>API全称 Application Programming Interface，<strong>应用程序接口</strong>。</p>
<p>可以通过我之前的回答了解一下</p>
<h2 id="如何通俗解释API。"><a href="#如何通俗解释API。" class="headerlink" title="如何通俗解释API。"></a><a target="_blank" rel="noopener" href="https://www.zhihu.com/question/21430743/answer/777048322">如何通俗解释API</a>。</h2><p>通常搜索在API的解释都是一组定义、程序及协议的集合，但对于不懂技术的人来说，这或许比较难以理解，接下来用抽象的故事来描述一下API。</p>
<p>假如老王开了一家银行，银行呢只有仓库和<a target="_blank" rel="noopener" href="https://www.zhihu.com/search?q=%E8%AE%B0%E8%B4%A6%E6%9C%AC&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra=%7B%22sourceType%22:%22answer%22,%22sourceId%22:777048322%7D">记账本</a>，顾客来了之后将金钱放在仓库里并在记帐本上记帐。老王很快就意识到一个问题，这个存钱的人打不开仓库、不认识字、故意写错存放金额的问题。于是老王雇佣了一个员工大旺，并给银行加了一个柜台，这样顾客就可以直接把金钱交给大旺，大旺记录好之后给顾客收据，并将金币存放在仓库中。</p>
<p><img src="https://picx.zhimg.com/80/v2-a5f5dd85498288fc8aee9607eb553ed5_720w.webp?source=1940ef5c" alt="img"></p>
<p>在这里老王雇佣了大旺来完成记帐存钱取钱等繁琐的任务，这节省了用户的时间，也提高了银行工作的效率。如果我们把这具体的事情抽象化，那代替大旺的角色就是<strong>API</strong>，很大的节省了开发人员的负担，提高了效率。</p>
<p>柜台将银行分为两个区域：客户在前台办理业务，后台进行存款取款等操作。在柜台，前台和后台进行了交互，双方不能越界<strong>。</strong>从API的属于来说，柜台就是术语中的API的<strong>接口</strong>，在这里完成交互。</p>
<p>假如顾客在存钱的时候，问大旺今天的股票情况，但大旺的工作只负责存钱取钱等流程，对顾客问的完全不了解。这里就要说一下API中的另一个术语<strong>协议</strong>，规定了双方在交互时候的一系列规则，双方都要遵守协议来完成。</p>
<p>如果顾客是一个英国人，而大旺他不会英语呢怎么办呢，这时候需要一个懂英语的同事来帮助大旺工作了。</p>
<p><img src="https://pic1.zhimg.com/80/v2-b71d855c38ecddff68cbf4024a6788ea_720w.webp?source=1940ef5c" alt="img"></p>
<p>在 API 术语里面， <strong>API 端点</strong>指的是同一个接口中提供特定功能子集的<a target="_blank" rel="noopener" href="https://www.zhihu.com/search?q=%E6%9C%8D%E5%8A%A1%E6%8F%90%E4%BE%9B%E8%80%85&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra=%7B%22sourceType%22:%22answer%22,%22sourceId%22:777048322%7D">服务提供者</a>。大旺和丽丽都是API中的端点，他们的工作不一样而已。</p>
<p>总结一下，<strong>API就是能够轻松实现和其他软件组件的交互。API接口就是实现不同组件之间交互地方，API协议就是规定不同组件交互时候的规则，API端点是在同一接口提高不同的功能。</strong></p>
<p>现在回头来看百科给出的API的定义来说，就容易理解了。</p>
<p>一般是指一些预先定义的函数，目的是提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力，而又无需访问源码，或理解内部工作机制的细节。通俗来讲<strong>API就是可以轻松实现和其他软件的交互。</strong></p>
<h2 id="举个栗子"><a href="#举个栗子" class="headerlink" title="举个栗子:"></a>举个栗子:</h2><p>胖虎是一个程序猿，老板要求他写一个火车票查询的软件，胖虎想提高工作效率，于是在写火车票查询的代码中，引入了<a href="https://link.zhihu.com/?target=http://www.binstd.com/">BinSTD平台</a>的火车票查询的接口，这样子就可以轻松实现功能。</p>
<h1 id="2、SDK是什么"><a href="#2、SDK是什么" class="headerlink" title="2、SDK是什么"></a><strong>2、SDK是什么</strong></h1><p>SDK全称software development kit，<strong>软件开发工具包</strong>。</p>
<p>一般都是一些<a target="_blank" rel="noopener" href="https://www.zhihu.com/search?q=%E8%BD%AF%E4%BB%B6%E5%B7%A5%E7%A8%8B%E5%B8%88&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra=%7B%22sourceType%22:%22answer%22,%22sourceId%22:796137064%7D">软件工程师</a>为特定的软件包、软件框架、硬件平台、<a target="_blank" rel="noopener" href="https://www.zhihu.com/search?q=%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra=%7B%22sourceType%22:%22answer%22,%22sourceId%22:796137064%7D">操作系统</a>等建立应用软件时的开发工具的集合。</p>
<p>通俗来讲<strong>就是第三方服务商提供的实现产品软件某项功能的工具包。</strong></p>
<h2 id="再来举个栗子："><a href="#再来举个栗子：" class="headerlink" title="再来举个栗子："></a>再来举个栗子：</h2><p>老板让胖虎来完成BinSTD网站上的业务功能，胖虎觉得开发周期长，不利于公司产品上线，偶然机会了解到了华为云平台上的相关功能，于是在基于华为云SDK下，通过编码调用华为云API,就可以访问华为云的资源和数据。</p>
<h1 id="3、API和SDK的区别"><a href="#3、API和SDK的区别" class="headerlink" title="3、API和SDK的区别"></a><strong>3、API和SDK的区别</strong></h1><ul>
<li>API是一个函数，有其特定的功能；而SDK是一个很多功能函数的集合体，一个工具包。</li>
<li>API是数据接口，SDK相当于开发集成工具环境，要在SDK的环境下来调用API。</li>
<li>API接口对接过程中需要的环境需要自己提供，SDK不仅提供<a target="_blank" rel="noopener" href="https://www.zhihu.com/search?q=%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83&search_source=Entity&hybrid_search_source=Entity&hybrid_search_extra=%7B%22sourceType%22:%22answer%22,%22sourceId%22:796137064%7D">开发环境</a>，还提供很多API。</li>
<li>简单功能调用，API调用方便快捷；复杂功能调用，SDK功能齐全。</li>
</ul>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="https://hmuseab.github.io">HMuSeaB</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="https://hmuseab.github.io/2023/04/15/API/">https://hmuseab.github.io/2023/04/15/API/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://hmuseab.github.io" target="_blank">HMuSeaB の 小站</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E7%9F%A5%E8%AF%86/">知识</a></div><div class="post_share"><div class="social-share" data-image="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2023/04/28/PyCharm%20%E7%9C%9F%E6%B0%B8%E4%B9%85%E6%BF%80%E6%B4%BB%E6%96%B9%E6%B3%95%E4%B8%8E%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/" title="PyCharm 真永久激活方法与插件使用教程"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">PyCharm 真永久激活方法与插件使用教程</div></div></a></div><div class="next-post pull-right"><a href="/2023/04/15/github%E5%9B%BE%E5%BA%8A%E4%BB%8B%E7%BB%8D/" title="github图床介绍"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">github图床介绍</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/2023/04/29/clash/" title="Clash"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-04-29</div><div class="title">Clash</div></div></a></div><div><a href="/2023/04/30/%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%20Alist%20%E7%9B%AE%E5%BD%95%E5%88%97%E8%A1%A8%E7%A8%8B%E5%BA%8F/" title="免费部署 Alist 目录列表程序"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-04-30</div><div class="title">免费部署 Alist 目录列表程序</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i0.hippopx.com/photos/121/457/241/girls-the-scenery-wallpaper-7f97112750013868bc5bcc249f13e27d.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">HMuSeaB</div><div class="author-info__description">MuSea的blog，欢迎访问</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">6</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/HMuSeaB" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:huangsibo948@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#1%E3%80%81API%E6%98%AF%E4%BB%80%E4%B9%88"><span class="toc-number">1.</span> <span class="toc-text">1、API是什么</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%A6%82%E4%BD%95%E9%80%9A%E4%BF%97%E8%A7%A3%E9%87%8AAPI%E3%80%82"><span class="toc-number">2.</span> <span class="toc-text">如何通俗解释API。</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%BE%E4%B8%AA%E6%A0%97%E5%AD%90"><span class="toc-number">3.</span> <span class="toc-text">举个栗子:</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#2%E3%80%81SDK%E6%98%AF%E4%BB%80%E4%B9%88"><span class="toc-number"></span> <span class="toc-text">2、SDK是什么</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%86%8D%E6%9D%A5%E4%B8%BE%E4%B8%AA%E6%A0%97%E5%AD%90%EF%BC%9A"><span class="toc-number">1.</span> <span class="toc-text">再来举个栗子：</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#3%E3%80%81API%E5%92%8CSDK%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number"></span> <span class="toc-text">3、API和SDK的区别</span></a></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2024/05/18/%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9%E5%8D%A1%E7%89%87%E6%A0%87%E7%AD%BE%E5%A4%96%E6%8C%82/" title="哔哩哔哩卡片标签外挂"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="哔哩哔哩卡片标签外挂"/></a><div class="content"><a class="title" href="/2024/05/18/%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9%E5%8D%A1%E7%89%87%E6%A0%87%E7%AD%BE%E5%A4%96%E6%8C%82/" title="哔哩哔哩卡片标签外挂">哔哩哔哩卡片标签外挂</a><time datetime="2024-05-18T13:53:45.000Z" title="发表于 2024-05-18 21:53:45">2024-05-18</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/04/26/Vim%E7%AE%80%E4%BB%8B/" title="Vim简介"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vim简介"/></a><div class="content"><a class="title" href="/2024/04/26/Vim%E7%AE%80%E4%BB%8B/" title="Vim简介">Vim简介</a><time datetime="2024-04-26T09:11:41.000Z" title="发表于 2024-04-26 17:11:41">2024-04-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/04/30/%E2%80%9C%E9%95%BF%E5%A4%A7%E5%90%8E%E6%89%8D%E5%8F%91%E7%8E%B0%EF%BC%8C%E8%AF%AD%E6%96%87%E8%AF%BE%E6%9C%AC%E9%87%8C%E9%9D%A2%E5%85%A8%E6%98%AF%E5%88%80%EF%BC%81%EF%BC%81%EF%BC%81%E2%80%9D/" title="“长大后才发现，语文课本里面全是刀！！！”"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="“长大后才发现，语文课本里面全是刀！！！”"/></a><div class="content"><a class="title" href="/2023/04/30/%E2%80%9C%E9%95%BF%E5%A4%A7%E5%90%8E%E6%89%8D%E5%8F%91%E7%8E%B0%EF%BC%8C%E8%AF%AD%E6%96%87%E8%AF%BE%E6%9C%AC%E9%87%8C%E9%9D%A2%E5%85%A8%E6%98%AF%E5%88%80%EF%BC%81%EF%BC%81%EF%BC%81%E2%80%9D/" title="“长大后才发现，语文课本里面全是刀！！！”">“长大后才发现，语文课本里面全是刀！！！”</a><time datetime="2023-04-30T08:44:00.000Z" title="发表于 2023-04-30 16:44:00">2023-04-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/04/30/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" title="Replit博客【已失效，留帖以纪念】"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Replit博客【已失效，留帖以纪念】"/></a><div class="content"><a class="title" href="/2023/04/30/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" title="Replit博客【已失效，留帖以纪念】">Replit博客【已失效，留帖以纪念】</a><time datetime="2023-04-30T08:44:00.000Z" title="发表于 2023-04-30 16:44:00">2023-04-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/04/30/%E2%80%9C%E7%8E%AB%E7%91%B0%E5%A4%AA%E8%B4%B5%E4%BA%86%EF%BC%8C%E2%BD%A4%E9%87%8E%E8%8D%89%E7%BA%AA%E5%BF%B5%E6%88%91%E5%90%A7%EF%BC%8C%E6%BB%A1%E5%9C%B0%E9%83%BD%E6%98%AF%EF%BC%8C%E7%94%9F%E7%94%9F%E4%B8%8D%E6%81%AF%E2%80%9D/" title="“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”"><img src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”"/></a><div class="content"><a class="title" href="/2023/04/30/%E2%80%9C%E7%8E%AB%E7%91%B0%E5%A4%AA%E8%B4%B5%E4%BA%86%EF%BC%8C%E2%BD%A4%E9%87%8E%E8%8D%89%E7%BA%AA%E5%BF%B5%E6%88%91%E5%90%A7%EF%BC%8C%E6%BB%A1%E5%9C%B0%E9%83%BD%E6%98%AF%EF%BC%8C%E7%94%9F%E7%94%9F%E4%B8%8D%E6%81%AF%E2%80%9D/" title="“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”">“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”</a><time datetime="2023-04-30T08:30:00.000Z" title="发表于 2023-04-30 16:30:00">2023-04-30</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2024 By HMuSeaB</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><div><a>很高兴认识你!</div></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js?v=4.13.0"></script><script src="/js/main.js?v=4.13.0"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page@5.2.0/instantpage.min.js" type="module"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu@4.0.7/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js?v=4.13.0"></script></div></div></body></html>